import request from '@/utils/request'

/**
 * 个人中心的后端接口
 */
export const getUserInfoDetail = () => {
  return request.get('/user/info')
}

/**
 * 获取用户详情页的后端接口
 */
export const getUserInfoDetail2 = () => {
  return request.get('/userInfo/detail')
}

/**
 * 发送用户修改的数据
 */
export const postUserInfo = (mobile,avatar_url,pwd) => {
  return request.put('/userInfo/detail', {
    mobile,
    avatar_url,
    pwd
  })
}

/**
 * 发送图片
 */
export const loadFiles = (data) => {
  return request({
        url: '/common/upload',
        data,
        method: 'post',
        headers: { 'Content-Type': 'multipart/form-data' }
  })
}




